#pragma once
#include <string>

class MysqlConnector;
class RedisConnector;
struct MYSQL_SERVER_PARAM;
struct REDIS_SERVER_PARAM;

#define MMO_FREE_REPLY(pReply)     \
DO_WHILE_MACRO_BEGIN              \
  if (pReply) {                   \
    freeReplyObject(pReply);      \
    (pReply) = NULL;              \
  }                               \
DO_WHILE_MACRO_END(false)

bool ConnectToMySQL(
					const char *container,
					MysqlConnector *connector,
					const MYSQL_SERVER_PARAM &param,
					bool *threadExitFlag
					);

bool ConnectToRedis(
					const char *container,
					RedisConnector *connector,
					const REDIS_SERVER_PARAM &param,
					bool *threadExitFlag
					);
